<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
<form action="/emp/confirmUpdate" method="post" enctype="multipart/form-data">
    <img src="${emp.images}" width="50"><br>
    <input type="file" name="myfile"/><br>
    <input type="number" name="empId" value="${emp.empId}">
    <input type="text" name="empName" value="${emp.empName}">
    <input type="text" name="empJob" value="${emp.empJob}">
    <input type="number" name="empSalary" value="${emp.empSalary}">
    <select name="did">
        <c:forEach items="${requestScope.depts}" var="d">
            <option ${d.deptId==emp.did?'selected':''} value="${d.deptId}">${d.deptName}</option>
        </c:forEach>
    </select>
    <c:forEach items="${requestScope.depts}" var="d">
        <p>Dept ID: ${d.deptId}, Dept Name: ${d.deptName}</p>
    </c:forEach>
    <!-- 添加修改按钮 -->
    <button type="submit">修改</button>
</form>
</body>
</html>
